using namespace std;
#include<iostream>
#include<signal.h>
#include<unistd.h>
void handler(int sig)
{
    cout<<"get sig:"<<sig<<endl;
    exit(1);
}
int main()
{
    signal(3,handler);
    int cnt=6;
    while(cnt)
    {
        cout<<"I am a process cnt"<< cnt-- <<endl;
        sleep(1);
    }
    raise(3);
    return 0;
}